/*****************************************************************
myd engine v0.1

File: myd_indexbuffer.h
Created: 20/08/09
*****************************************************************/

#ifndef MYD_INDEX_BUFFER_H
#define MYD_INDEX_BUFFER_H

//#include "myd.h"
#include "system/myd_system.h"

namespace myd
{
	class MYD_API Indexbuffer
	{
		DECLARE_SMART_POINTER(Indexbuffer);

		public:
			Indexbuffer(unsigned int uiIndexCount);
			~Indexbuffer(void);

			LPDIRECT3DINDEXBUFFER9 wn_IBO;
			bool create(IDirect3DDevice9* D3Ddevice);
			//short aCubeIndices;
			/*void setvertex(uint index, const vertex &v);
			const vertex & getvertex(uint index) const;*/
			unsigned int getId() const;
			size_t getIndexCount () const;

		private:
			std::vector<unsigned int> indicesVector;
			unsigned int uiId;
			static unsigned int currId;
	};
}//end namespace
#endif //MYD_INDEX_BUFFER_H